<?php

namespace XWAM\Controller;

/**
 * Description of SiteConfigController
 *
 * @since 1.0 <2015-10-20> SoChishun <14507247@qq.com> Added.
 * @since 1.1 2016-7-6 SoChishun SiteConfig 重构为 SiteConf
 */
class WebsiteConfController extends AppbaseController {
    // 2016-4-21
    public function site_setting($site_id = 0, $user_name = '') {
        if (!$site_id) {
            $site_id = $this->site_id;
            $user_name = $this->user_name;
        }
        $m_site = new \XWAM\Model\WebsiteConfModel();
        $data = $m_site->find_site($site_id, $user_name);
        $this->assign('data', $data);
        $this->display();
    }

    public function site_setting_save() {
        $m_site = new \XWAM\Model\WebsiteConfModel();
        $result = $m_site->save_site();
        $this->dialogJump($result['status'], $result['info']);
    }

}
